<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //?<xx> 来起别名
        let name="sasafaw2qe2唐玮";
        let reg=/([s])(?<han>唐玮)/;
        // console.log(name.match(reg));
        
        // $<>来使用
        console.log(name.match(reg));
       console.log(name.replace(reg,`$1-$<han>`));//sasafaw2qe2-唐玮
    </script>
</body>
</html>